/**
 * CustomerDepartmentId实体类
 *
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.entity;


import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import java.io.Serializable;
import java.util.Objects;

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class CustomerDepartmentId implements Serializable {
    private Long customer;
    private Long department;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CustomerDepartmentId that = (CustomerDepartmentId) o;
        return Objects.equals(customer, that.customer) && 
               Objects.equals(department, that.department);
    }

    @Override
    public int hashCode() {
        return Objects.hash(customer, department);
    }
} 